package com.bdqn.mapper;

import com.bdqn.pojo.HisRegistration;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

//挂号信息表
public interface HisRegistrationMapper {
    @Select("SELECT * FROM his_registration where dept_id=#{deptId} and reg_status<3")
    List<HisRegistration> getHisRegistrationKS(@Param("deptId") int deptId);//科室编号查询
    @Select("SELECT * FROM his_registration")
    List<HisRegistration> getHisRegistration();//挂号信息查询
    List<HisRegistration> getHisRegistrationTJ( int deptId, String patientName, int schedulingType, int subsectionType, int registrationStatus);//挂号信息条件查询
    int addHisRegistration(HisRegistration hisRegistration);//添加挂号
    @Update("update his_registration set reg_status=#{regStatus} where reg_id=#{regId}")
    int setHisRegistrationDANGE(@Param("regStatus") int regStatus,@Param("regId")String regId);//修改挂号信息
}
